package com.market.manager.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.market.dao.OrderDetailDao;
import com.market.dao.ProductDao;
import com.market.domain.OrderDetail;
import com.market.manager.OrderDetailManager;

@Service("orderDetailManager")
public class OrderDetailManagerImpl extends GenericManagerImpl<OrderDetailDao, OrderDetail, Long> implements
		OrderDetailManager {
	
	@Autowired
	private ProductDao productDao;

	@Override
	@Autowired
	public void setDao(OrderDetailDao dao) {
		this.dao = dao;	
	}

	
	public OrderDetail fetchOne(Long id) {
		return this.dao.findById(id);
	}

	public OrderDetail fetchOne(OrderDetail orderDetail) {
		return this.fetchOne(orderDetail.getId());
	}


	@Override
	public OrderDetail store(OrderDetail object) {
		
		return super.store(object);
	}

	
}
